#pragma once

#ifndef Schema_h
#define Schema_h

#include "Standards.h"

class Schema {
	public:

		//fields
		int numAttributes;
		int numRows;
		map<NAME,int> someMap;
		vector<NAME> attributeList;
		vector< vector<INDEX> > attributeItems;

		//! Default constructor
		Schema();
		
		//! Parameterized constructor
		Schema(int,vector<NAME>);

		//! A method that clears all the fields
		void clear();

		//! A method that deeps copies a Schema object
		/*!
		  \param Schema object to be copied
		*/
		void deepCopy(Schema);

		//! A method that inserts a tuple 
		/*!
		  \param vector<INDEX> the tuple to be inserted
		*/
		void insertTuple(vector<INDEX>);
		
		//! A method that finds the common attributes of two Schema objects
		/*!
		  \param Schema the object to be compared with
		*/
		vector<NAME> findCommonAttribute(Schema);

		//! A method that performs a natural join 
		/*!
		  \param Schema the Schema object to perform the join on
		  \return the resulting Schema object from the join
		*/
		Schema naturalJoin(Schema);

		//! A method that performs a projection 
		/*!
		  \param NAME the value of the attribute that must appear in the output of the projection
		  \return the set of values of the projection
		*/
		set<INDEX> project(NAME);

		set<vector<INDEX>> project(vector<NAME>);

		//! A method that prints the Schema
		void printSchema();
};
#endif